package com.ruoyi.business.service.impl;

import com.ruoyi.business.domain.TAliZftMerchantInfo;
import com.ruoyi.business.mapper.TAliZftMerchantInfoMapper;
import com.ruoyi.business.service.ITAliZftMerchantInfoService;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * 直付通二级商户进件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-01
 */
@Service
public class TAliZftMerchantInfoServiceImpl implements ITAliZftMerchantInfoService 
{
    @Autowired
    private TAliZftMerchantInfoMapper tAliZftMerchantInfoMapper;

    /**
     * 查询直付通二级商户进件
     * 
     * @param id 直付通二级商户进件主键
     * @return 直付通二级商户进件
     */
    @Override
    public TAliZftMerchantInfo selectTAliZftMerchantInfoById(Long id)
    {
        return tAliZftMerchantInfoMapper.selectTAliZftMerchantInfoById(id);
    }

    /**
     * 查询直付通二级商户进件列表
     * 
     * @param tAliZftMerchantInfo 直付通二级商户进件
     * @return 直付通二级商户进件
     */
    @Override
    @DataScope(userAlias = "t")
    public List<TAliZftMerchantInfo> selectTAliZftMerchantInfoList(TAliZftMerchantInfo tAliZftMerchantInfo)
    {
        return tAliZftMerchantInfoMapper.selectTAliZftMerchantInfoList(tAliZftMerchantInfo);
    }

    @Override
    public List<TAliZftMerchantInfo> selectTAliZftMerchantInfoListByNoAuth(TAliZftMerchantInfo tAliZftMerchantInfo) {
        return tAliZftMerchantInfoMapper.selectTAliZftMerchantInfoListByNoAuth(tAliZftMerchantInfo);
    }

    /**
     * 新增直付通二级商户进件
     * 
     * @param tAliZftMerchantInfo 直付通二级商户进件
     * @return 结果
     */
    @Override
    public int insertTAliZftMerchantInfo(TAliZftMerchantInfo tAliZftMerchantInfo)
    {

        tAliZftMerchantInfo.setCreateTime(DateUtils.getNowDate());
        return tAliZftMerchantInfoMapper.insertTAliZftMerchantInfo(tAliZftMerchantInfo);
    }

    /**
     * 修改直付通二级商户进件
     * 
     * @param tAliZftMerchantInfo 直付通二级商户进件
     * @return 结果
     */
    @Override
    public int updateTAliZftMerchantInfo(TAliZftMerchantInfo tAliZftMerchantInfo)
    {
        tAliZftMerchantInfo.setUpdateTime(DateUtils.getNowDate());
        return tAliZftMerchantInfoMapper.updateTAliZftMerchantInfo(tAliZftMerchantInfo);
    }

    /**
     * 批量删除直付通二级商户进件
     * 
     * @param ids 需要删除的直付通二级商户进件主键
     * @return 结果
     */
    @Override
    public int deleteTAliZftMerchantInfoByIds(String ids)
    {
        return tAliZftMerchantInfoMapper.deleteTAliZftMerchantInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除直付通二级商户进件信息
     * 
     * @param id 直付通二级商户进件主键
     * @return 结果
     */
    @Override
    public int deleteTAliZftMerchantInfoById(Long id)
    {
        return tAliZftMerchantInfoMapper.deleteTAliZftMerchantInfoById(id);
    }
}
